﻿#region

using System;
using System.Collections.Generic;
using HouseHoldBudget.Core.Entities.Expenses;

#endregion

namespace HouseHoldBudget.Core.Entities.Budgets
{
    public class BudgetCategory : BaseEntity
    {
        #region Fields

        private ICollection<ExpenseType> _expenseTypes;

        #endregion

        #region Instance Properties

        /// <summary>
        ///   Gets or sets the name of the budget category.
        /// </summary>
        /// <value> The name of the budget category. </value>
        public virtual string BudgetCategoryName { get; set; }

        /// <summary>
        ///   Gets or sets the budget id.
        /// </summary>
        /// <value> The budget id. </value>
        public virtual Guid BudgetId { get; set; }

        /// <summary>
        /// Gets or sets the expense types.
        /// </summary>
        /// <value>
        /// The expense types.
        /// </value>
        public virtual ICollection<ExpenseType> ExpenseTypes
        {
            get
            {
                return _expenseTypes ?? (_expenseTypes = new List<ExpenseType>());
            }
            protected set
            {
                _expenseTypes = value;
            }
        }

        /// <summary>
        ///   Gets or sets the repartition amount.
        /// </summary>
        /// <value> The repartition amount. </value>
        public virtual decimal RepartitionAmount { get; set; }

        /// <summary>
        ///   Gets or sets the budget.
        /// </summary>
        /// <value> The budget. </value>
        public Budget Budget { get; set; }

        #endregion
    }
}